const mongoose = require('mongoose');
// 连接数据库
mongoose.connect( 'mongodb://127.0.0.1:27017/frontend', {useNewUrlParser: true});
// 配置数据库映像
var membersSchema = new mongoose.Schema({
    name:String,
    age:String,
    like:String,
    state:Boolean,
    imageUrl:String
},
//去除版本号__v
{versionKey: false}
);
// 读取数据库
var membersModel = mongoose.model("Members",membersSchema,"members");
module.exports=membersModel;